package com.dong.order.feign;

import com.dong.order.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author dongjian
 */
@FeignClient(value = "userservice")
public interface UserFeign {

    /**
     * 根据userId查询User信息
     *
     * @param userId 用户Id
     * @return
     */
    @GetMapping("/user/{userId}")
    User findUserById(@PathVariable("userId") Long userId);
}
